<?php

namespace app\admin\model\sales;

use think\Model;

/**
 * Salesorderdetails
 */
class Salesorderdetails extends Model
{
    // 表主键
    protected $pk = 'orderlineno';
    
    // 表名
    protected $name = 'sales_salesorderdetails';

    // 自动写入时间戳字段
    protected $autoWriteTimestamp = false;


    public function ordernoTable(): \think\model\relation\BelongsTo
    {
        return $this->belongsTo(\app\admin\model\sales\Salesorders::class, 'orderno', 'orderno');
    }

    public function stkcodeTable(): \think\model\relation\BelongsTo
    {
        return $this->belongsTo(\app\admin\model\stock\Stockmaster::class, 'stkcode', 'stockid');
    }
}